#include <iostream>
#define int long long
using namespace std;


signed main(){
	int n,c,ans=0;
	cin>>n>>c;
	int r[n];
	for(signed i=0;i<n;i++)
		cin>>r[i];
	for(signed i=0;i<n;i++){
		int l;
		cin>>l;
		int num=l-r[i];
		if(num > 0)
			ans += num*c;
	}
	cout<<ans;
	return 0;
}
